// main.cpp
#include <QGuiApplication>
#include <QQuickView>
#include "person.h"

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    // 使用 QML 类型系统注册
    qmlRegisterType<Person>("People", 1, 0, "Person");
    qmlRegisterType<IDCard>("People", 1, 0, "IDCard");

    QQuickView view;
    view.setSource(QUrl("qrc:/main.qml"));
    view.show();
    view.setIcon(QIcon(":/logo.png"));
    view.setTitle(QStringLiteral("将C++对象暴露给QML"));

    return app.exec();
}
